-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix: Hide 'Edit Items...' when ListBox DataSource is set #14065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: merriemcgaw <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #14065 +/- ##
====================================================
+ Coverage 77.15867% 97.40709% +20.24841%
====================================================
Files 3279 1214 -2065
Lines 645317 357397 -287920
Branches 47718 5599 -42119
====================================================
- Hits 497918 348130 -149788
+ Misses 143692 8473 -135219
+ Partials 3707 794 -2913
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@copilot With the |
- Modified ListControlUnboundActionList to conditionally show "Edit Items..." action only when DataSource is null - Added ItemsPropertyDescriptor to ListBoxDesigner to remove editor from Properties window when DataSource is set - Updated tests to verify the new behavior - Reverted previous exception handling approach per feedback Co-authored-by: LeafShi1 <[email protected]>
You're absolutely right! I've updated the solution to hide the "Edit Items..." option when DataSource is set, instead of showing an error message. The changes include:
The fix is in commit 9b0328e. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot Now the "Edit Items" in Smart Tag window is removed when binding data Source for ListBox and the "Edit Items..." command link is removed too in Properties window. But the |




Fixes #14063
Proposed changes
ListControlUnboundActionListto hide "Edit Items..." action in smart tag when DataSource is setItemsPropertyDescriptorinListBoxDesignerto remove editor from Properties window when DataSource is setListControlUnboundActionListTeststo verify action is shown/hidden based on DataSource stateCustomer Impact
Regression?
No - improves UX by preventing invalid operations, does not change behavior of valid scenarios
Risk
Low - changes only affect UI availability when DataSource is set, does not alter any functional behavior when DataSource is null
Screenshots
Before
"Edit Items..." appears in smart tag and Properties window even when DataSource is set, clicking it shows error:
After
"Edit Items..." is hidden when DataSource is set (no action shown in smart tag, no editor link in Properties window):
Test methodology
GetSortedActionItems_ShouldReturnEmpty_WhenDataSourceIsSetto verify smart tag action is hidden when DataSource is setGetSortedActionItems_ShouldReturnCorrectItems_WhenDataSourceIsNullto verify action appears when DataSource is nullTest environment(s)
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Microsoft Reviewers: Open in CodeFlow